﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Globalization;

namespace EasyVideoEditor.Converters
{
    [ValueConversion(typeof(Boolean), typeof(Boolean))]
    public class ReverseBooleanConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value.GetType() == typeof(Boolean))
            {
                Boolean date = (Boolean)value;
                return !date;
            }
            return false;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value.GetType() == typeof(Boolean))
            {
                Boolean date = (Boolean)value;
                return !date;
            }
            return false;
        }
    }
}
